<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
</head>
<body>
    <h1>表格</h1>
    <hr>
    <table border="1" width="500px" cellspacing="0"  ><!--border 边框 cellspacing使单元格与单元格之间空白有多大-->
        <caption>
            <h1>学生信息表</h1>
        </caption>
        <colgroup>
            <col style="background-color: blue" width="100">
            <col style="background-color: red" width="100" span="2"><!--span跨列-->
            <col style="background-color: olivedrab" width="100">
        </colgroup>
        <tr>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>班级</th>
            <th>分数</th>
        </tr>
        <tr align="center"><!--align对其方式-->
            <td>小虎</td>
            <td>男</td>
            <td>6岁</td>
            <td>H02班</td>
            <td>92分</td>
        </tr>
        <tr align="center">
            <td>小明</td>
            <td>男</td>
            <td>6岁</td>
            <td>H02班</td>
            <td>93分</td>
        </tr>
        <tr align="center">
            <td>小叶</td>
            <td>女</td>
            <td>6岁</td>
            <td>H02班</td>
            <td>89分</td>
        </tr>
        <tr>
            <td colspan="5" align="center">20200206收集信息</td><!--合并列-->
        </tr>
    </table>
    <table border="1"cellspacing="0" cellpadding="5">
        <caption><h2>收入情况表</h2></caption>
        <thead>
        <tr>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>职位</th>
            <th>年收入</th>
        </tr>
        </thead>
        <tbody>
        <tr >
            <td>小虎</td>
            <td>男</td>
            <td>30岁</td>
            <td>银行职员</td>
            <td>￥100</td>
        </tr>
        <tr>
            <td>小明</td>
            <td>男</td>
            <td>45岁</td>
            <td>司机</td>
            <td>￥90</td>
        </tr>
        <tr>
            <td>小叶</td>
            <td>女</td>
            <td>33岁</td>
            <td>教师</td>
            <td>￥70</td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <td colspan="5" align="center">仅供参考</td>
        </tr>
        </tfoot>
    </table>
    <hr>
    <table border="1" cellspacing="0">
        <tr align="center">
            <td rowspan="2">&nbsp;</td>
            <td colspan="2">理科</td>
            <td colspan="2">文科</td>
            <td rowspan="2">其他</td>
        </tr>
        <tr>
            <td>物理</td>
            <td>化学</td>
            <td>政治</td>
            <td>历史</td>
        </tr>
        <tr>
            <td>小明</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>&nbsp;</td><!--空格-->
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
</body>
</html>